package cn.edu.zut.DAO;
import cn.edu.zut.model.Student;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository(value = "bdi1")
public class StudentDAOlmpl implements StudentDAO {
    private List<Student>students;

    @Override
    public void insertStudent(Student student) {
        String INSERT_Student= "INSERT INTO student(number,name,sex) VALUES(?,?,?)";

        Object[] args = { student.getNumber(), student.getName(),student.getSex()};
        jdbcTemplate.update(INSERT_Student, args);
    }

    @Override
    public void insertAll(List<Student> studentList) {

    }
}
